home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 201-225 / disk_201 / draco / drinc / form.g < prev    next >
Text File  |  1992-05-06  |  2KB  |  62 lines

  1. /*Useofformroutines:
  2.  
  3. „CallCRT_FormStarttoclearoutanyexistingformandinitialize.
  4.  
  5. „AddfieldstotheformwithCRT_FormIntandCRT_FormChars:
  6. ˆline-screenlineforstartofprompt
  7. ˆcol-screencolumnforstartofprompt
  8. ˆlen-screenlengthforcharsorintvalue(max6forint)
  9. ˆheader-headertoleftofinputarea
  10. ˆpChanged-pointertovariable,whichafterCRT_FormRead,will
  11. Œcontain'true'ifthatfieldwaschanged
  12. ˆptr-pointertobufferholdingvalue
  13. ˆcheck-routinetocalltochecknewvalues
  14.  
  15. „CallCRT_FormRead:
  16. ˆheader-multilineheadertocenterattopofscreen
  17. ˆflags-byteofflags:
  18. ŒFORMHEADERS-displayheadersonthiscall
  19. ŒFORMSKIP-useautoskiponinputfields
  20. ŒFORMINPUT-allowinput(otherwisejustdisplay)
  21. ŒFORMOUTPUT-displayvalues(otherwiseassumetheyarethere)
  22. ˆterminators-stringofcharactersallowedtoterminateinputof
  23. Œafield.Thefollowingshouldbepresenttoenabletheir
  24. Œfunctions,butwillneverbereturned:
  25. CONTROL-R-usedtoforceresetofafield
  26. CONTROL-Z-usedtoforceresetofallfields
  27. ŒThefollowingarenormallypresenttoenabletheirfunctions:
  28. CONTROL-Q-usedtodoaquickexit
  29. ESCAPE-usedtoresetallfieldsandexit
  30. ˆThecharacterreturnedisthecharacterfrom'terminators'thatthe
  31. ˆusertypedwhichcausedanexit.Carriagereturn(CONTROL-M)isthe
  32. ˆmostlikely,i.e.theuserfilledinallfieldsandfellofftheend.
  33. */
  34.  
  35. char
  36. „CONTROL_Q='\(0x11)',
  37. „CONTROL_R='\(0x12)',
  38. „CONTROL_Z='\(0x1a)',
  39. „ESCAPE„='\(0x1b)';
  40.  
  41. *charTERMINATORS="\(CONTROL_Q)\(CONTROL_R)\(CONTROL_Z)\(ESCAPE)";
  42.  
  43. extern
  44. „_F_initialize()void,
  45. „_F_terminate()void,
  46. „CRT_FormIntOK(intn)bool,
  47. „CRT_FormCharsOK(*charp)bool,
  48. „CRT_FormStart()void,
  49. „CRT_FormInt(ushortline,col,len;*charheader;
  50. *boolpChanged;*intptr;
  51. proc(intn)boolcheck)void,
  52. „CRT_FormChars(ushortline,col,len;*charheader;
  53. ’*boolpChanged;*charptr;
  54. “proc(*charp)boolcheck)void,
  55. „CRT_FormRead(*charheader;byteflags;*charterminators)char;
  56.  
  57. byte
  58. „FORMHEADERS=0x01,
  59. „FORMSKIP=0x02,
  60. „FORMINPUT=0x04,
  61. „FORMOUTPUT=0x08;
  62.